﻿Imports DTO
Imports BUS

Public Class frmThemNCC

    Private Sub btn_them_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_them.Click
        Dim ncc As New NhaCungCapDTO()
        ncc.TenNCC = txt_TenNcc.Text
        ncc.SDT = Integer.Parse(txtsdt.Text)
        ncc.DiaChi = txt_diachi.Text
        ncc.MaLoai = cbb_maloai.SelectedValue
        ncc.NgayCungCap = dtp_ngaycc.Value
        NhaCungCapBUS.THEM(ncc)
        LoadDSNCC()
        MessageBox.Show("Da Them Thanh Cong!")
    End Sub
    Private Sub LoadDSNCC()
        dgv_themncc.DataSource = NhaCungCapBUS.LAYTATCA()
    End Sub
    Private Sub load()
        ' cbb_maloai
    End Sub
    Private Sub frmThemNCC_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        LoadDSNCC()
    End Sub
End Class